package kr.ac.kongju.gedl.cmmn.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class CommonVO implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6809377182881361099L;

	/** 키워드 검색 방법(=, like 등)*/
	private List<Object> searchKeywordMethod;
	
	/** 키워드 검색 접속사 (AND, OR)*/
	private List<Object> searchKeywordConjunction;
	
	/** 정렬 컬럼*/
	private String sort;
	/** 정렬 방향*/
	private String dir;
	
	/** 시작 page*/
	private int page = 1;
	
	/** 한쪽당 출력 사이즈*/
	private int rowPerPage = 20;
		
	/** 페이지사이즈 */
    private int pageSize = 10;
    
    /** paging 쿼리 사용시 시작위치 */
    private int offset = 0;
    
    /** paging 쿼리 사용시 끝위치 */
    private int limit = 0;
	

	public List<Object> getSearchKeywordMethod() {
		return searchKeywordMethod;
	}

	public void setSearchKeywordMethod(List<Object> searchKeywordMethod) {
		this.searchKeywordMethod = searchKeywordMethod;
	}

	public List<Object> getSearchKeywordConjunction() {
		return searchKeywordConjunction;
	}

	public void setSearchKeywordConjunction(List<Object> searchKeywordConjunction) {
		this.searchKeywordConjunction = searchKeywordConjunction;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public String getDir() {
		return dir;
	}

	public void setDir(String dir) {
		this.dir = dir;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getRowPerPage() {
		return rowPerPage;
	}

	public void setRowPerPage(int rowPerPage) {
		this.rowPerPage = rowPerPage;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	
	public CommonVO() {
		searchKeywordMethod = new ArrayList<Object>();
		searchKeywordConjunction = new ArrayList<Object>();
	}

	public int getOffset() {
		offset = (page-1)*rowPerPage;
		return offset;
	}

	public void setOffset(int offset) {
		this.offset = offset;
	}

	public int getLimit() {
		limit = page*rowPerPage;
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}
	
	
	
	
}
